home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group92c.txt / 000101_icon-group-sender _Fri Nov 13 17:27:32 1992.msg < prev    next >
Internet Message Format  |  1993-01-04  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Tue, 8 Dec 1992 09:51:44 MST
  2. Date: 13 Nov 92 17:27:32 GMT
  3. From: mercury.hsi.com!mlfarm!cs.arizona.edu!icon-group@uunet.uu.net
  4. Subject: Second argument to sortf
  5. Message-Id: <527005@MTS.cc.Wayne.edu>
  6. Sender: icon-group-request@cs.arizona.edu
  7. To: icon-group@cs.arizona.edu
  8. Status: R
  9. Errors-To: icon-group-errors@cs.arizona.edu
  10.  
  11. Greg Townsend has told us that he just didn't think of the possibility
  12. of using a field name as the second argument to sortf when he built it.
  13. Given that it's too late to redo the design, what's the best way to provide
  14. this obviously useful functionality?
  15.  
  16. (1) Perhaps the implementation could be modified, as Jerry Nowlin suggested,
  17. to overload the second argument so that a field name would be interpreted
  18. as the key field.
  19.  
  20. (2) But an even neater approach, which wouldn't require modifying sortf at
  21. all, would be an Icon function fieldpos(rectype, fld) that would take a
  22. record type and field name as inputs and would yield the field position
  23. as output.  Such a function would probably have other uses as well.
  24.  
  25. Paul Abrahams
  26.  
  27.